import axiosData from "@/api/axios-inspection";

export default {
  /**
   * @description: 获取设备点检项列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {} *
   * @return {Array}
   */
  queryTemplatePageList(params) {
    return axiosData.get("/checkItemModel/queryPageList", params);
  },
  /**
   * @description: 获取设备点检项列表 *代表必填
   * @return {Array}
   */
  queryTemplateList(params) {
    return axiosData.get("/checkItemModel/queryList", params);
  },
  /**
   * @description: 新增设备点检项
   * @param {Object} params *
   * @return {Object}
   */
  addTempalte(params) {
    return axiosData.post("/checkItemModel/add", params);
  },
  /**
   * @description: 编辑设备点检项
   * @param {Object} params *
   * @return {Object}
   */
  editTempalte(params) {
    return axiosData.post("/checkItemModel/edit", params);
  },
  /**
   * @description: 批量删除设备点检项
   * @param {Object} params *
   * @return {Object}
   */
  delTempalteList(params) {
    return axiosData.post("/checkItemModel/delList", params);
  },
  /** *****************************检查项设备关联************************************************************/
  /**
   * @description: 获取检查项设备关联列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {} *
   * @return {Array}
   */
  queryConfigPageList(params) {
    return axiosData.get("/equipmentCheckItemMapper/queryPageList", params);
  },
  queryConfigList() {
    return axiosData.get("/equipmentCheckItemMapper/queryList", { farming: sessionStorage.farming });
  },
  /**
     * @description: 新增检查项设备关联
     * @param {Object} params *
     * @return {Object}
     */
  add(params) {
    return axiosData.post("/equipmentCheckItemMapper/add", params);
  },
  /**
     * @description: 编辑检查项设备关联
     * @param {Object} params *
     * @return {Object}
     */
  edit(params) {
    return axiosData.post("/equipmentCheckItemMapper/edit", params);
  },
  /**
     * @description: 批量删除检查项设备关联
     * @param {Object} params *
     * @return {Object}
     */
  delList(params) {
    return axiosData.post("/equipmentCheckItemMapper/delList", params);
  },
  /**
     * @description: 根据设备编号查询检查项
     * @param {Object} params *
     * @return {Object}
     */
  queryByEquipmentCode(params) {
    return axiosData.get("/equipmentCheckItemMapper/queryByEquipmentCode", params);
  }

};
